<?php
/**
 *	KLF Framework
 *
 *	@author Kristian Oye <kristianoye@gmail.com> 
 *	@copyright (C) 2010-2011, Kristian Oye
 */
namespace KLF\System\Web\Routing
{
	use KLF\System\KComponent;
	use KLF\System\Web\IHttpHandler;
	use KLF\System\Web\KHttpContext;
	use KLF\System\IApplicationContext;
	use KLF\System\Web\Routing\KRouteData;
	
	/**
	 *  Class KRouteContext
	 *
	 *  @package KLF\System\Web\Routing
	 *  @access public
	 *  @author Kristian Oye <kristianoye@gmail.com>
	 *  @since 0.1
	 *  
	 *  @method KRouteContext NewInstance
	 *  
	 *  @property KHttpContext $HttpContext The current HTTP context.
	 *  @property KRouteCollection $RouteCollection
	 *  @property KRouteData $RouteData The collection of route.
	 */
	class KRouteContext extends KComponent implements IApplicationContext
	{
		/**
		 * Information about the HTTP request and response.
		 * @var IApplicationContext
		 */
		protected $_rpropHttpContext;
		
		/**
		 * [read-only] Contains information about the route
		 * @var KRouteData $_RouteData;
		 */
		protected $_rpropRouteData;
		
		/**
		 * A collection of routes.
		 * 
		 * @var KRouteCollection $_propRoutes
		 */
		protected $_propRouteCollection;
		
		/**
		 * Constructs a new KRequestContext object.
		 *
		 * @author Kristian Oye <kristianoye@gmail.com>
		 * @since 0.1
		*/
		public function __construct(KHttpContext $context=null, KRouteData $routeData=null, KRouteCollection $routes=null)
		{
			$this->_rpropHttpContext = $context;
			$this->_rpropRouteData = $routeData;
			$this->_propRouteCollection = $routes;
		}
	}
}